const express = require('express');
const history = require('connect-history-api-fallback');
const cors = require('cors');
const app = express();
const port = '8566';

app.use(cors('*'));

/**
 * 单页面应用需要的历史记录模块
 */
app.use(history());

/**
 * 输出静态资源
 */
app.use(express.static('../dist'));

/**
 * 监听端口
 */
app.listen(port, () => console.log(`Your application is running here: http://localhost:${port}`));
